package com.epkursant.testy;

import com.ep.general.kursant.Kursant;

public class TestView {

	public String getData() {
		StringBuilder sb = new StringBuilder();

		for (Test item : new TestMdt().getList()) {
			sb.append(item.getAsJson());
			sb.append(",");
		}

		if (!(sb.length() == 0)) {
			sb.deleteCharAt(sb.length() - 1);
		}
		return sb.toString();
	}
	
	public String getDataWyniki(Kursant kursant) {
		StringBuilder sb = new StringBuilder();

		for (TestyWyniki item : new TestyWynikiMdt().getList(kursant)) {
			sb.append(item.getAsJson());
			sb.append(",");
		}

		if (!(sb.length() == 0)) {
			sb.deleteCharAt(sb.length() - 1);
		}
		return sb.toString();
	}
	
}
